package cn.itsource.org.ro;

import cn.itsource.org.domain.Shop;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

@Data
public class ShopRo {
    @NotBlank(message = "name 不能为空")
    private String name;
    @NotBlank(message = "tel 不能为空")
    private String tel;
    private String address;
    private String logo;
    private EmployeeRo admin;

    public static Shop ShopRotoShop(ShopRo shopRo){
        Shop shop = new Shop();
        BeanUtils.copyProperties(shopRo,shop);
        return shop;
    }
}
